package reposibility.chain;

/**
 * @author ZLL
 * @date create in 2018/05/10
 */
public class Main {

    public static void main(String[] args) {

        Approver zhang = new Director("zs");
        Approver li= new VicePresident("lisi");
        Approver wang = new President("wang");

        zhang.setSuccessor(li);
        li.setSuccessor(wang);


        PurchaseRequest request = new PurchaseRequest(1001, 3000, "购买电脑");

        zhang.handleRequest(request);

        PurchaseRequest request1 = new PurchaseRequest(1002, 8888, "购买电脑");

        zhang.handleRequest(request1);

        PurchaseRequest request2 = new PurchaseRequest(1003, 12000, "购买电脑");

        zhang.handleRequest(request2);


    }
}
